package com.alibaba.otter.manager.web.valiadator.annotation;


import com.alibaba.otter.manager.web.valiadator.ELGroupValidator;
import jakarta.validation.Constraint;
import jakarta.validation.Payload;

import java.lang.annotation.*;

@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE})
@Documented
@Repeatable(OpGroup.List.class)
@Constraint(validatedBy = ELGroupValidator.class)
public @interface OpGroup {


    String message() default "";

    Class<?>[] groups() default { };

    Class<? extends Payload>[] payload() default { };

    String el();

    /**
     * 指定条件成立执行验证分组，不能为空
     */
    Class<?>[] opGroups();


    @Retention(RetentionPolicy.RUNTIME)
    @Target({ElementType.TYPE})
    @Documented
    @interface List  {
        OpGroup[] value();
    }

}
